package com.yun.modules.domain;

import com.yun.common.BaseModel;
import com.yun.modules.constant.Tables;
import com.yun.properties.IDG;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

/**
 * 数据库持久化对象
 *
 * @author WUWY
 * @create 2018-05-12 上午10:46
 **/
@Entity
@Table(name = Tables.USER)
@GenericGenerator(name = "id", strategy = IDG.UUID)
public class User extends BaseModel<String> {

    @Column(name = "username")
    @NotBlank(message = "username不允许为空")
    private String username;

    @Column(name = "password")
    private String password;

    public User() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
